<template>
    <div>
        登录名: <input type="text" v-model="account">
        密码: <input type="password" v-model="password">
    </div>
    <LoginCheck :ValAccount="account" :ValPassword="password" @check="checkOk" />
    <p v-if="isOk">账号密码是正确的</p>
    <p v-else>账号密码是错误的</p>
</template>

<script>
import LoginCheck from './LoginCheck.vue';

export default {
    components:{
        LoginCheck
    },
    data() {
        return {
            account: '',
            password: '',
            isOk: false
        }
    },
    methods:{
        checkOk(isOkByChild) {
            this.isOk = isOkByChild
        }
    }
}
</script>